GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( ddf1dd...57ebb4 )
by Stefano
02:24
created

clean.js ➔ make_red   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
var program = require('commander');
2
var shell = require('shelljs');
3
var chalk = require('chalk');
4
var co = require('co');
5
var prompt = require('co-prompt');
6
var rimraf = require('rimraf');
7
8
program
9
  .usage('[options] <enviroment ...>')
10
  .arguments('<enviroment>')
11
  .action(function(enviroment) {
12
13
    shell.mkdir('-p',['applications/assets/icons']);
14
15
    shell.echo('Build Server Vagrant ('+enviroment+')');
16
17
    if ( enviroment === 'dev' ){
18
19
      // SSH
20
      rimraf('server/plays/ssh/*.key');
21
      rimraf('server/plays/ssh/*.pub');
22
23
      // SSL
24
      rimraf('server/plays/ssl/*.key');
25
      rimraf('server/plays/ssl/*.crt');
26
      rimraf('server/plays/ssl/*.pem');
27
28
      // ANSIBLE ROLE
29
      rimraf('server/roles/external/*');
30
31
      shell.cd('server');
32
33
      destroyVagrantServer = shell.exec('vagrant destroy -f');
0 ignored issues
show
Bug introduced by
The variable destroyVagrantServer seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.destroyVagrantServer.
Loading history...
34
35
      if ( destroyVagrantServer.code !== 0 ){
36
        //ERRORE
37
        process.stderr.write(chalk.red("Errore: "+destroyVagrantServer.stderr+ " - "+destroyVagrantServer.output));
38
        process.exit(1);
0 ignored issues
show
Compatibility Debugging Code Best Practice introduced by
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
39
      }
40
41
      shell.cd('..');
42
43
    } else {
44
45
        //NOTHING ???
46
47
    }
48
49
  })
50
  .parse(process.argv);
51
52
53
if (!process.argv.slice(2).length) {
54
  program.outputHelp(make_red);
55
}
56
57
function make_red(txt) {
58
  return chalk.red(txt); //display the help text in red on the console
59
}
60